OC与Swift代码转换工具

http://www.ucai.cn/tools/oc2swift
https://apps.myappconverter.com/cbcs
http://objc2swift.yahoo-labs.jp/
https://objectivec2swift.com/#/converter/
http://objc2swift.yahoo-labs.jp/
https://iswift.org/try
https://iswift.org/
http://okaxaki.github.io/objc2swift/demo.html
http://uicolor.xyz/#/rgb-to-ui
https://www.toptal.com/swift/from-objectivec-to-swif
http://www.objgen.com/json?demo=true
https://app.quicktype.io/

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//建模并生成实时JSON数据值
//交互方式使用简单的语法。
//String是默认值类型
//支持Number,Date和Boolean类型
version n = 3.1
releaseDate d = 2014-06-25
demo b = true

//tabs或空格定义复杂的值-字典
person
id number = 12345
name = John Doe
phones
home = 800-123-4567
mobile = 877-123-1234

//使用[]来定义简单的数组类型
email[] s = jd@example.com, jd@example.org
dateOfBirth d = 1980-01-02
registered b = true

//使用[n]来定义对象数组
emergencyContacts[0]
name s = Jane Doe
phone s = 888-555-1212
relationship = spouse
emergencyContacts[1]
name s = Justin Doe
phone s = 877-123-1212
relationship = parent

文章作者: kyren
文章链接: http://huluo666.github.io/2017/03/28/Swift转换OBJECTIVE C/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Kyren's Blog